import 'package:flutter_test/flutter_test.dart';
import 'package:component_pay_login_share/component_pay_login_share.dart';
import 'package:component_pay_login_share/component_pay_login_share_platform_interface.dart';
import 'package:component_pay_login_share/component_pay_login_share_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockComponentPayLoginSharePlatform
    with MockPlatformInterfaceMixin
    implements ComponentPayLoginSharePlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ComponentPayLoginSharePlatform initialPlatform = ComponentPayLoginSharePlatform.instance;

  test('$MethodChannelComponentPayLoginShare is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelComponentPayLoginShare>());
  });

  test('getPlatformVersion', () async {
    ComponentPayLoginShare componentPayLoginSharePlugin = ComponentPayLoginShare();
    MockComponentPayLoginSharePlatform fakePlatform = MockComponentPayLoginSharePlatform();
    ComponentPayLoginSharePlatform.instance = fakePlatform;

    expect(await componentPayLoginSharePlugin.getPlatformVersion(), '42');
  });
}
